import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function setUserInfo() {
  return request.post('/sys/profile')
}

export function logout() {
  /* return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  }) */
}

export const userPhoto = id => {
  return request.get(`/sys/user/${id}`)
}

/* export function userPhoto(id) {
  return request({
    url: `/sys/user/${id}`
  })
} */
// 修改员工基本信息
export const saveUserDetailById = data => {
  return request.put(`/sys/user/${data.id}`, data)
}
export const assignRoles = data => {
  return request.put('/sys/user/assignRoles', data)
}
